package com.sunday.aomicaichang.ui.order;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.sunday.common.base.BaseActivity;
import com.sunday.aomicaichang.R;
import com.sunday.aomicaichang.ui.MainActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;


public class PaySuccessActivity extends BaseActivity {

    @Bind(R.id.tv_price)
    TextView tvPrice;
    @Bind(R.id.tv_name)
    TextView tvName;
    @Bind(R.id.tv_address)
    TextView tvAddress;
    @Bind(R.id.btn_next)
    TextView btnNext;

    private String total_Money;
    private String address;
    private String name;
    private String mobile;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_complete_pay);
        ButterKnife.bind(this);
        total_Money = getIntent().getStringExtra("totalMoney");
        address = getIntent().getStringExtra("address");
        name = getIntent().getStringExtra("name");
        mobile = getIntent().getStringExtra("mobile");
        tvPrice.setText("订单金额：" + total_Money);
        tvName.setText("收货人：" + name + "  " + mobile);
        tvAddress.setText("收货地址：" + address);

    }

    @OnClick({R.id.btn_next,R.id.back})
    void onClick(View v) {
        switch (v.getId())
        {
            case R.id.btn_next:
                intent = new Intent(mContext, BuyOrderListActivity.class);
                startActivity(intent);
                finish();
                break;
            case R.id.back:
                intent = new Intent(mContext, MainActivity.class);
                startActivity(intent);
                finish();
                break;
        }

    }


}
